package bb.lanxing.calc.data;

public class CrosstrainerPoint implements Cloneable, RecycleData {
    private double crosstrainerspeed;
    private double crosstrainertotaldistance;
    private int crosstrainerstride;
    private int crosstrainersteprate;
    private int crosstrainerpower;
    private int crosstrainerresistancelevel;
    private int crosstrainerenergy;
    private int source = 2;

    public CrosstrainerPoint copy(CrosstrainerPoint reuse) {
        if (reuse == null) {
            reuse = new CrosstrainerPoint();
        }
        reuse.crosstrainertotaldistance = this.crosstrainertotaldistance;
        reuse.crosstrainerspeed = this.crosstrainerspeed;
        reuse.crosstrainerstride = this.crosstrainerstride;
        reuse.crosstrainersteprate = this.crosstrainersteprate;
        reuse.crosstrainerpower = this.crosstrainerpower;
        reuse.crosstrainerresistancelevel = this.crosstrainerresistancelevel;
        reuse.crosstrainerenergy = this.crosstrainerenergy;
        reuse.source = this.source;
        return reuse;
    }

    public CrosstrainerPoint clone() {
        try {
            return (CrosstrainerPoint) super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
            return null;
        }
    }

    @Override
    public void recycle() {
        this.crosstrainertotaldistance = 0;
        this.crosstrainerspeed = 0;
        this.crosstrainerstride = 0;
        this.crosstrainersteprate = 0;
        this.crosstrainerpower = 0;
        this.crosstrainerresistancelevel = 0;
        this.crosstrainerenergy = 0;
        this.source = 2;
    }

    public double getCrosstrainerSpeed() {
        return this.crosstrainerspeed;
    }

    public void setCrosstrainerSpeed(double crosstrainerspeed) {
        this.crosstrainerspeed = crosstrainerspeed;
    }

    public double getCrosstrainerTotalDistance() {
        return this.crosstrainertotaldistance;
    }

    public void setCrosstrainerTotalDistance(double crosstrainertotaldistance) {
        this.crosstrainertotaldistance = crosstrainertotaldistance;
    }
    public int getCrosstrainerStride() {
        return this.crosstrainerstride;
    }

    public void setCrosstrainerStride(int crosstrainerstride) {
        this.crosstrainerstride = crosstrainerstride;
    }

    public int getCrosstrainerStepRate() {
        return this.crosstrainersteprate;
    }

    public void setCrosstrainerStepRate(int crosstrainersteprate) {
        this.crosstrainersteprate = crosstrainersteprate;
    }

    public int getCrosstrainerPower() {
        return this.crosstrainerpower;
    }

    public void setCrosstrainerPower(int crosstrainerpower) {
        this.crosstrainerpower = crosstrainerpower;
    }

    public int getCrosstrainerResistanceLevel() {
        return this.crosstrainerresistancelevel;
    }

    public void setCrosstrainerResistanceLevel(int crosstrainerresistancelevel) {
        this.crosstrainerresistancelevel = crosstrainerresistancelevel;
    }

    public int getCrosstrainerEnergy() {
        return this.crosstrainerenergy;
    }

    public void setCrosstrainerEnergy(int crosstrainerenergy) {
        this.crosstrainerenergy = crosstrainerenergy;
    }

    public int getSource() {
        return this.source;
    }

    public void setSource(int source) {
        this.source = source;
    }
}
